home *** CD-ROM | disk | FTP | other *** search
/ Freelog 38 / Freelog038.iso / Bas / Bureautique / Ntl480 / Setup.exe / {app} / Libraries / RemindMe.clb < prev    next >
Text File  |  2002-06-10  |  2KB  |  65 lines

  1. = V5 MultiLine NoSorting TabWidth=30
  2.  
  3. H=";About this library"
  4. This library shows how you can use the timer Clip event to create a scheduler. The timer event executes the "Remind Me" Clip every 30 seconds. The script in that Clip then checks the system clock, and if one of the tested time ranges is matched, it jumps to the specified label and displays an appropriate message. Feel free to customize this Clip with your own schedules.
  5.  
  6. Note that the timer event stops as soon as you close the library, but not when you hide the Clipbook window or when you switch to other libraries. Use the "Stop reminding" Clip to disable the timer event, and the "Start again" Clip if you want it to resume.
  7.  
  8.  
  9. H=";"
  10.  
  11.  
  12.  
  13. H="Stop reminding"
  14. ;Stop the Clip timer and display confirmation message
  15. ^!TimerStop
  16. ^!Prompt The timer has now been disabled. Double-click on the "Start again" Clip to resume.
  17.  
  18.  
  19. H="Start again"
  20. ;Timer event will be triggered every 30 seconds
  21. ^!TimerStart 30000
  22. ;The timer will activate the Clip "Remind Me" at the defined time interval
  23. ^!TimerPlay Remind Me
  24. ;Display confirmation message
  25. ^!Prompt The "Remind Me" scheduler is now active
  26.  
  27. H=";"
  28.  
  29.  
  30.  
  31. H="_OnOpen"
  32. ;Check if this library has been opened before. If it has, skip the instructions below
  33. ^!If ^$GetValue(efoRemindMe)$ = 1 Exit
  34. ;Save key value to NoteTab's INI file
  35. ^!SaveValue efoRemindMe=1
  36. ;Show instructions contained in the "About this library" Clip
  37. ^!Clip "About this library"
  38. ;Activate the Clip "Start again"
  39. ^!Clip "Start again"
  40.  
  41.  
  42. H="_Remind Me"
  43. ^!IfSame ^$GetDate(ddd)$ Sun Sunday
  44. ^!IfInRange ^$GetDate(mmddhhnn)$ 04141545..04141600 MeetBoss
  45. ^!IfInRange ^$GetDate(h)$ 12..13 LunchTime
  46. ^!GoTo End
  47.  
  48. :MeetBoss
  49. ^!IfTrue ^%p_MeetBossShown% End
  50. ^!Prompt Important! Time to meet the boss :-(
  51. ^!Set %p_MeetBossShown%=True
  52. ^!GoTo End
  53.  
  54. :Sunday
  55. ^!IfTrue ^%p_SundayShown% End
  56. ^!Prompt It's Sunday! Don't forget to get some rest ;-)
  57. ^!Set %p_SundayShown%=True
  58. ^!GoTo End
  59.  
  60. :LunchTime
  61. ^!IfTrue ^%p_LunchTimeShown% End
  62. ^!Prompt Your computer clock tells me it's time for lunch!
  63. ^!Set %p_LunchTimeShown%=True
  64. ^!GoTo End
  65.